package com.ele.service;

import java.sql.SQLException;

import com.ele.dao.ShopDao;
import com.ele.pojo.Shop;

public class ShopService {
	/**
	 * 	商家登入
	 * @param id
	 * @param password
	 * @return
	 */
	public Shop shopLogin(int id, String password) {
		
			ShopDao shopdao = new ShopDao();
			
			try {
				return shopdao.shopLogin(id ,password);
			} catch (SQLException e) {
				return null;
			}
	}
	/**
	 * 	商家更改信息
	 * @param shop
	 * @return
	 */
	public int updateShop(Shop shop) {
		ShopDao shopdao = new ShopDao();
		try {
			return shopdao.shopLogin(shop);
		} catch (SQLException e) {
			e.printStackTrace();
			return 0;
		}
	}
}
